<%@ page import="online.rainy.dbhomework.pojo.Grade" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>详情 - <%=request.getAttribute("course")%></title>
    <style>
        table {
            border-collapse: collapse;
        }

        table, td, th {
            border: 1px solid black;
        }
    </style>
</head>
<body>
  <a href="${pageContext.request.contextPath}/">返回上页</a>
    <table>
        <thead>
            <th>学号</th>
            <th>姓名</th>
            <th>课程</th>
            <th>成绩</th>
            <th>备注</th>
        </thead>
        <tbody>
        <% List<Grade> list = (List<Grade>) request.getAttribute("result"); %>
        <% for(int i=0;i<list.size();i++) { %>
        <tr>
            <td><%=list.get(i).getSid()%></td>
            <td><%=list.get(i).getStudent().getSname()%></td>
            <td><%=list.get(i).getCourse().getCname()%></td>
            <td><%=list.get(i).getScore()%></td>
            <td><%=list.get(i).getNote()%></td>
        </tr>
        <% } %>
        </tbody>
    </table>
</body>
</html>
